package gongshw.bank.tag;

import java.io.IOException;

import gongshw.bank.model.User;

import javax.servlet.http.HttpSession;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.*;

public class UserState extends SimpleTagSupport {
	
	private User cur_userUser;
	
	
	@Override
	public void doTag() throws IOException {
		PageContext pc = (PageContext)getJspContext();
		HttpSession session = pc.getSession();
		cur_userUser = (User) session.getAttribute("user");
		if(cur_userUser==null){
			JspWriter out = getJspContext().getOut();  
			out.println("<meta http-equiv=\"refresh\" content=\"0;/j2eeBank/user/login.html\"/>");
		}
		else {
			;
		}
	}
	
}
